home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
dvivga9.zip
/
DVIHEAD.H
< prev
next >
Wrap
Text File
|
1988-05-30
|
17KB
|
360 lines
/* -*-C-*- dvihead.h */
/*-->dvihead*/
/**********************************************************************/
/****************************** dvihead *******************************/
/**********************************************************************/
/**********************************************************************/
/************************* Revision History *************************/
/**********************************************************************/
/***********************************************************************
[Begin Revision History]
<BEEBE.TEX.DVI.NEW>DVIHEAD.H.2, 24-Jun-86 18:11:55, Edit by BEEBE
Added saving of all ten TeX page counters in prtpage() in global array
tex_counter[], and function tctos() to convert them to a string for
printing. All warning and error messages are now accompanied by a list
of the non-zero page counters to help relate errors to output document
pages.
<BEEBE.TEX.DVI>DVIHEADER.H.21, 13-Mar-86 10:43:33, Edit by BEEBE
Added use of getenv() for Unix and PC-DOS to pick up definitions of
texinputs and texfonts at runtime; if these are available, they override
built-in choices. This makes it possible to move compiled code to
similar machines with different directory structures without having to
recompile. For TOPS-20, this is unnecessary, since the defaults already
point to these, and a name of the form /texinputs/foo.bar is translated
by PCC-20 to texinputs:foo.bar, from which the current definition of the
logical name "texinputs:" is used to find the desired directory. It can
even be a chain of directories; in Unix and PC-DOS, we will need to
introduce a special version of fopen() to handle filenames with
environment variable prefixes which might represent directory chains.
Removed variable-length argument lists to fatal() and warning() for
portability. Changed all preprocessor #ifdef's and #ifndef's to #if's
for portability; all symbols for devices, operating systems, and
implementations are now explicitly defined to be 0 or 1. IBM PC Lattice
C will not accept the operators "!", "||", or "&&" in #if expressions,
although they should be perfectly legal; rearranged several expressions
to avoid these (introduce #else, use "|" and "&").
Added procedures fontfile() and fontsub() to encapsulate construction of
system-dependent font file names and provide for user-specifiable font
substitutions for unavailable font files (new runtime option
-ffontfile).
Removed old #ifdef FOOBAR ... #endif code sections in several procedures
which were completely obsolete. Added header comment line to every
file; it contains the EMACS "-*-C-*-" mode string and the exact
(case-sensive) filename, since many functions have been defined with
names in mixed case for readability (probably should have used
underscore instead, but none do), and on Unix, the letter case matters.
Replaced index() and rindex(), which have different definitions in
different C implementations, by 4.2BSD (and coming ANSI C standard)
functions strchr() and strrchr(), for which .h files are provided.
<BEEBE.TEX.DVI>DVIHEADER.H.11, 8-Jan-86 16:55:59, Edit by BEEBE
Added DVITYPE Version 2.6 MAXDRIFT correction to pixel coordinates.
This adds function fixpos() called from movedown(), moveover(),
setchar(), and setrule(), and #include'd in DVI*.c with definitions in
gblprocs.h and machdefs.h. Revision level incremented by 0.01 (most are
now at 2.01)
<BEEBE.TEX.DVI>DVIHEADER.H.7, 22-Jul-85 12:51:02, Edit by BEEBE
Added PostScript driver for Apple LaserWriter.
Added support for multiple input DVI files to each of which all switch
options apply.
<BEEBE.TEX>DVIJET.C.70, 30-May-85 00:33:51, Edit by BEEBE
Revised "int" type declarations to signed types (INT8, INT16, INT32),
unsigned types (BYTE, UNSIGN16, UNSIGN32), and coordinate type
(COORDINATE) as a prelude to moving to microprocessors where long
integers impose a serious runtime penalty.
Type casts added to many assignments and arguments.
"double" changed to "float".
Added a few more "register" declarations and deleted unused variables.
Device-dependent code sections identified as prelude to code sharing
between device drivers via "#include" statements for each shareable
procedure.
Added -c, -o, -r, -x, -y options and inch() procedure.
Several passes with "lint" under VAX Unix to detect further problems
<BEEBE.TEX>DVIJET.C.18, 27-May-85 23:44:34, Edit by BEEBE
Revise copy of Printronix driver for output on Hewlett-Packard Laser Jet
<BEEBE.TEX>DVIPRX.C.125, 20-Oct-84 14:02:27, Edit by BEEBE
Add mag_table[] and rewrite actfact() to use it. Add code to readfont()
and openfont() to choose nearest available font magnification when
required one is unavailable. Enable USEGLOBALMAG since code now can
handle it properly. Allow upper-case option letters as equivalents of
lower-case ones -- non-Unix folks abhor such distinctions.
<BEEBE.TEX>DVIPRX.C.118, 30-Sep-84 14:42:10, Edit by BEEBE
Change = to == in "if (...)" in procedure warning, change g_dolog to
BOOLEAN.
[End Revision History]
***********************************************************************/
/**********************************************************************/
/************************ Development History ***********************/
/**********************************************************************/
/***********************************************************************
**
** The code is arranged to allow easy modification of the output for
** display on other dot matrix printers, and for porting to a new host
** computing environment. The sections labelled "Device Definitions"
** and "Global Definitions" below definitely need to be modified in
** such a case. A couple of the 40 or so procedures in the '#include
** "xxx.h"' section may need to be adjusted as well, but almost all the
** rest should be both host- and output-device-independent.
**
** The runtime switches will be similar for most devices, but some will
** require additional ones. Device-name conditionals should be used to
** bracket these, so that code can be lifted without modification for
** use in a new dvi driver.
**
** Instead of building up a bit map corresponding to the final printer
** file, we keep a large array which has a one-to-one correspondence
** with the printed page; dots in a horizontal raster on the page are
** consecutive in memory. This allows us to OR in character raster
** patterns without having to unpack every single bit. At end-of-page
** time, each raster row is trimmed of trailing white space and
** formatted into a line of data to be sent to the printer file. For
** those devices which pack dots for 6, 7, or 8 rows into a single
** character, some merging of raster lines will be necessary.
**
** To use the program, type:
**
** dvixxx {-b} {-c#} {-d#} {-ffontsubfile} {-l} {-m#} {-o#:#} {-o#} {-p}
** {-r#} {-v} {-x#units} {-y#units} dvifile(s)
**
** The order of command options and DVI file names is not significant;
** all switch values apply to all DVI files. DVI files are processed
** in order from left to right. The command options are (letter case
** is IGNORED):
**
** b Backwards order printing from the default. For example,
** laser printers using the Canon engine print normally
** receive pages in reverse order because they stack printed
** side up. Some have page handling mechanisms that stack
** them face down, and in such a case -b will ensure that
** they come out in order 1,2,... instead of n,n-1,n-2,...
**
** c# Print # copies of each output page.
**
** d# Debug output to stderr if non-zero value given.
**
** ffontsubfile Define an alternate font substitution file which
** is to be used instead of the default ones (see below).
**
** l Inhibit logging.
**
*